package org.vectrics.common.db;

import org.vectrics.domain.Domain;

public class PropertyType implements RecordObject, Voidable {
	public static String INTEGER_TYPE = "integer";
	public static String STRING_TYPE = "string";
	public static String DATE_TYPE = "date";
	public static String DECIMAL_TYPE = "decimal";
	
	private Long id = null;
	private Domain domain = null;
	private boolean global = false;
	private String code = null;
	private String dataType = null;
	private boolean selectable = false;
	private int length = 100;
	private String phraseCode = null;
	private String objectType = null;
	private String field1 = null;
	private String field2 = null;
	private String field3 = null;
	private boolean required = false;
	private boolean searchable = false;
	private boolean voided = false;

	// Need to add to mapping.
	private boolean unique = false;
	private boolean allowMultiple = false;
	
	public PropertyType() {
		super();
	}

	/**
	 * @return Returns the domain.
	 */
	public Domain getDomain() {
		return domain;
	}

	/**
	 * @param domain The domain to set.
	 */
	public void setDomain(Domain domain) {
		this.domain = domain;
	}

	/**
	 * @return Returns the global.
	 */
	public boolean isGlobal() {
		return global;
	}

	/**
	 * @param global The global to set.
	 */
	public void setGlobal(boolean global) {
		this.global = global;
	}

	/**
	 * @return Returns the code.
	 */
	public String getCode() {
		return code;
	}



	/**
	 * @param code The code to set.
	 */
	public void setCode(String code) {
		this.code = code;
	}



	/**
	 * @return Returns the dataType.
	 */
	public String getDataType() {
		return dataType;
	}



	/**
	 * @param dataType The dataType to set.
	 */
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}



	/**
	 * @return Returns the id.
	 */
	public Long getId() {
		return id;
	}



	/**
	 * @param id The id to set.
	 */
	public void setId(Long id) {
		this.id = id;
	}



	/**
	 * @return Returns the objectType.
	 */
	public String getObjectType() {
		return objectType;
	}



	/**
	 * @param objectType The objectType to set.
	 */
	public void setObjectType(String objectType) {
		this.objectType = objectType;
	}



	/**
	 * @return Returns the phraseCode.
	 */
	public String getPhraseCode() {
		return phraseCode;
	}



	/**
	 * @param phraseCode The phraseCode to set.
	 */
	public void setPhraseCode(String phraseCode) {
		this.phraseCode = phraseCode;
	}

	/**
	 * @return Returns the field1.
	 */
	public String getField1() {
		return field1;
	}

	/**
	 * @param field1 The field1 to set.
	 */
	public void setField1(String field1) {
		this.field1 = field1;
	}

	/**
	 * @return Returns the field2.
	 */
	public String getField2() {
		return field2;
	}

	/**
	 * @param field2 The field2 to set.
	 */
	public void setField2(String field2) {
		this.field2 = field2;
	}

	/**
	 * @return Returns the field3.
	 */
	public String getField3() {
		return field3;
	}

	/**
	 * @param field3 The field3 to set.
	 */
	public void setField3(String field3) {
		this.field3 = field3;
	}

	/**
	 * @return Returns the required.
	 */
	public boolean getRequired() {
		return required;
	}

	/**
	 * @param required The required to set.
	 */
	public void setRequired(boolean required) {
		this.required = required;
	}

	/**
	 * @return Returns the searchable.
	 */
	public boolean getSearchable() {
		return searchable;
	}

	/**
	 * @param searchable The searchable to set.
	 */
	public void setSearchable(boolean searchable) {
		this.searchable = searchable;
	}

	/**
	 * @return Returns the voided.
	 */
	public boolean getVoided() {
		return voided;
	}

	/**
	 * @param voided The voided to set.
	 */
	public void setVoided(boolean voided) {
		this.voided = voided;
	}

	public boolean getAllowMultiple() {
		return allowMultiple;
	}

	public void setAllowMultiple(boolean allowMultiple) {
		this.allowMultiple = allowMultiple;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public boolean getSelectable() {
		return selectable;
	}

	public void setSelectable(boolean selectable) {
		this.selectable = selectable;
	}

	public boolean getUnique() {
		return unique;
	}

	public void setUnique(boolean unique) {
		this.unique = unique;
	}


}
